package com.sunrate.investingquote.manage;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.stereotype.Component;

import javax.annotation.PreDestroy;

/**
 * @author yyh
 * @description:
 * @date 2023/06/19/ 16:04
 */
@Component
@Slf4j
public class AsynManage {
//    @Autowired
//    @Qualifier("schedulerThreadPool")
//    private ThreadPoolTaskScheduler schedulerThreadPool;
//    @Autowired
//    @Qualifier("serviceThreadPool")
//    private ThreadPoolTaskExecutor serviceThreadPool;
//
//    @PreDestroy
//    public void shutDown() {
//        try {
//            log.info("====关闭后台任务任务线程池====");
//            schedulerThreadPool.destroy();
//            serviceThreadPool.destroy();
//        } catch (Exception e) {
//            log.error(e.getMessage(), e);
//        }
//    }
}
